package com.edushare.common.mailer;

import com.edushare.common.vo.CourseInstances;
import com.edushare.common.vo.Departments;
import com.edushare.common.vo.OutgoingEmails;
import com.edushare.common.vo.Universities;
import com.edushare.common.vo.Users;

public class NewUser extends MailStringLoader {

	public NewUser(Users to, Users newUser, Universities univ, int roleType){
		userTo = to;
	}
	
	public NewUser(Users to, Users newUser, Departments dept, int roleType){
		userTo = to;
	}
	
	public NewUser(Users to, Users newUser, CourseInstances course, int roleType){
		userTo = to;
	}
	
	private void init(){
		messageString = templateParser(mailString, replaceMap);
	}
	
	private String mailString = MailBase.get().stringMap.get(MailBase.SCHCANCEL_MAIL);
	private Users userTo = null;
	private String subject = "";
	
	@Override
	public OutgoingEmails send() {
		OutgoingEmails mail = new OutgoingEmails();
		mail.setContent(messageString);
		mail.setReceiverEmailId(userTo.getEmail());
		mail.setStatus(OutgoingEmails.EMAIL_TO_BE_SENT);
		mail.setCopyType(1);
		mail.setSubject("New ");
		return mail;
	}

}
